<template>
  <div class="order-container">
    <div :class="type==1?'order-item active':'order-item'" @click="type=1" style="margin-left: 0">综合排序</div>
    <div :class="type==2?'order-item active':'order-item'" @click="type=2">销量</div>
    <div :class="type==3?'order-item active':'order-item'" @click="type=3">浏览量</div>
    <div :class="type==4?'order-item active':'order-item'" @click="type=4">价格</div>
    <div :class="type==5?'order-item active':'order-item'" @click="type=5">发布时间</div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';

export default defineComponent({
  name: 'Order',
});
</script>

<script setup lang="ts">
const type = ref(1);
</script>

<style scoped lang="less">
//  导航
.order-container {
  padding: 25px 30px;
  border-radius: 4px;
  background-color: #fff;
  margin-bottom: 10px;
  .order-item.active {
    color: #f93684;
  }
  .order-item {
    display: inline-block;
    font-size: 14px;
    color: #7d8090;
    cursor: pointer;
    margin-left: 60px;
  }
}
</style>
